package com.cqrcb.cloud.utils;

import com.sun.org.apache.bcel.internal.generic.RETURN;

import java.net.InetAddress;
import java.net.UnknownHostException;

/**
 * @author ：yangxueyong
 * @date ：Created in 2021/6/1 14:46
 */
public class IPUtils {
    private static String localIP = null;
    static{
        InetAddress address = null;
        try {
            address = InetAddress.getLocalHost();
            localIP = address.getHostAddress();
        } catch (UnknownHostException e) {

        }
    }
    public static String getLocalIP(){
        return localIP;
    }
}
